<template>
	<view>
	
		<view   class="popup-container">
			<view>
				<scroll-view scroll-x="true" class="scroll-x">
				  <uni-table border stripe emptyText="暂无更多数据">
					<scroll-view scroll-y="true" class="scroll-y">
					  <!-- 表头 -->
					  <uni-tr>
						<uni-th width="100" align="right">工序号</uni-th>
						<uni-th width="60" align="right">合格</uni-th>
						<uni-th width="60" align="center">工废</uni-th>
						<uni-th width="60" align="left">料废</uni-th>

	
					  </uni-tr>
				
					  <!-- 表格数据 -->
					  <uni-tr v-for="(item, index) in dataList" :key="index">
						<uni-td>{{item.operpNo + ':' +  item.describtion }}</uni-td>
						<uni-td>{{ item.quaQty }}</uni-td>
						<uni-td>{{ item.processFailQty }}</uni-td>
						<uni-td>{{ item.materialFailQty }}</uni-td>

						<!-- <uni-td>
						  <view class="scan-icon" @click="scanLocation(item)">
							<image src="/static/img/scan.png" style="width: 30px; height: 30px; margin-left: 10px;" class="search-icon-image" />
						  </view>
						</uni-td> -->
					  </uni-tr>
					</scroll-view>
				  </uni-table>
				</scroll-view>

				
			</view>
		</view>
	

		
	
	</view>
	
</template>

<script>
	import {getOptrptByTray}  from '@/utils/api.js'

	
	export default {
		components: {

		},
		data() {
			return {
				dataList:[],//推荐仓位的数据集合
				billNo :''
		
			};
		},
		methods: {
			// 获取详情数据
			initData(){
				getOptrptByTray({billNo :this.billNo }).then(res => {
					this.dataList = res.data.data.dataList
	

				})


			},
			
			open(data) {
				this.dataList = data.dataList
			
				this.$refs.commendRef.open('center')
			
			},
			close() {
				this.$refs.commendRef.close()
			}
		},
		onLoad(e) {
			this.billNo = e.billNo
			// 获取详情数据
			this.initData()
		}
	}
</script>

<style lang="scss">
	.popup-container {
	  max-height: 100vh; /* 弹窗最大高度占屏幕 90% */
	  background: #fff;
	  display: flex;
	  flex-direction: column;
	  width: 100%;
	 
	}
	.popup-footer {
	  min-height: 50rpx;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	}
.scroll-x {
  width: 100%;
  max-width: 90%;
  overflow-x: auto;
}

.scroll-y {
  flex: 1;
  max-height: 70vh;
  overflow-y: auto;
}

uni-table {
  min-width: 800px; /* 根据你实际的列数设置最小宽度 */
  table-layout: fixed;
  background-color: #409eff;
}
.selectPopup-panel{
	background-color: #fff;
	width: 250px;
	height: 100px;
}

.manual-input {
	width: 100%;
	height: 30px;
	padding: 0 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
}
.manual-input:focus {
	border-color: #409eff; /* 聚焦时高亮 */
	box-shadow: 0 0 4px rgba(64, 158, 255, 0.5);
}

</style>
